<script setup lang="ts">
//行为
import { onMounted,ref } from 'vue';

const inputRef = ref<HTMLAnchorElement | null>(null)

onMounted(()=>{
  console.log(inputRef.value);
  inputRef.value?.focus()
})


</script>

<template>
<!--结构 -->
<h1>Hello Vue3</h1>
<input type="text" ref="inputRef">
<a href="https://itheima.com">黑马</a>
</template>

<style scoped>
/*样式*/
</style>